package com.linwen.excise.niuke._20;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

/**
 * @author wlw
 * @date 2023/3/2 11:36 PM
 */
public class _14符串排序 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<String> strArr = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            strArr.add(scanner.next());
        }
        Collections.sort(strArr);
        for (String s : strArr) {
            System.out.println(s);
        }

    }
}
